package thn.home.glf.kotoba;

import thn.home.glf.kotoba.database.BaiDB;
import thn.org.home.lib.SQLiteDB;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.widget.ListView;

public class LessonList extends Activity {
	ListView listbailist;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_lesson_list);
        listbailist=(ListView)findViewById(R.id.mylist);
		SQLiteDB db = new SQLiteDB(this);
		db.open();
		BaiDB baiDB = new BaiDB(db);
		LessonAdapter adapter=new  LessonAdapter(LessonList.this, baiDB.List());
		db.close();
		listbailist.setAdapter(adapter);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_lesson_list, menu);
        return true;
    }
}
